{% extends "base.html" %}
{% block page %}
<script language="JavaScript">
function myrefresh()
{
   window.location.reload();
}
setTimeout('myrefresh()',600000); //指定60秒刷新一次
</script>
<div class="div"><p>线上业务项目状态(internet)</p></div>
<br>
<div>
    <form action="/chart_center_internet" method="post">
        <div align="center">
            {{ form.csrf_token }}
            <p>请选择域名:{{ form.select_internet }}</p>
            <p>{{ form.submit(class="btn btn-info") }}</p>
        </div>
    </form>
    <div class="left1_div">
        {% if DOMAIN_DATA %}
            <strong class="left">{{ DOMAIN_DATA[0]['name'] }} 访问并发(分钟)</strong>
            {% line_chart DOMAIN_DATA %}
            <br>
            <strong class="left">{{ RT_DATA[0]['name'] }} 响应时间(毫秒)</strong>
            {% line_chart RT_DATA %}
            <br>
        {% else%}
            <p style="position: absolute">实时PV:<font color="#006400">{{ PV }}</font>&nbsp; 实时UV:<font color="#006400">{{ UV }} </font></p>
            <strong>LVS负载活动连接数（1天）</strong>
            {% line_chart LVS_DATA %}
        {% endif %}
    </div>
</div>
{% with messages = get_flashed_messages() %}
    {% if messages %}
        <div class="alert alert-success alert-dismissable" style="display:inline-block;*display:inline;*zoom:1;">
            {% for message in messages %}
                <p>{{ message }}<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button></p>
            {% endfor %}
        </div>
    {% endif %}
{% endwith %}
{% endblock page %}
